]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Disable "tray" button in lock/login screen
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 24 Sep 2012 19:52:47 +0000 (21:52 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 25 Sep 2012 06:25:26 +0000 (08:25 +0200)
It is not possible to summon the tray via shortcut or dwelling
while the screen is locked, so it is odd to allow it from the
on-screen-keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=683546

js/ui/keyboard.js

index 2389ba5f14e03d61725ce950b1f326e48eacc0b5..4d97a9deab35f5264966d9180d3a5f4678cc76ae 100644 (file)
@@ -349,6 +349,13 @@ const Keyboard = new Lang.Class({
             trayButton.reactive = true;
             trayButton.remove_style_pseudo_class('grayed');
         }));
+        Main.sessionMode.connect('updated', Lang.bind(this, function() {
+            trayButton.reactive = !Main.sessionMode.isLocked;
+            if (Main.sessionMode.isLocked)
+                trayButton.add_style_pseudo_class('grayed');
+            else
+                trayButton.remove_style_pseudo_class('grayed');
+        }));
 
         return trayButton;
     },